SELECT "temp_zc_info".*,ORG_UNIT."ID" deptId,ORG_MEMBER."ID" memberId,CTP_ENUM_ITEM."ID" as statusName FROM FORMMAIN_0986
LEFT JOIN "temp_zc_info" ON "temp_zc_info"."equip_code" = FORMMAIN_0986.FIELD0001
LEFT JOIN ORG_MEMBER ON ORG_MEMBER."CODE" = "temp_zc_info"."cn" AND ORG_MEMBER.IS_ENABLE = 1 AND ORG_MEMBER.IS_DELETED = 0
LEFT JOIN ORG_UNIT ON ORG_UNIT."CODE" = "temp_zc_info"."code" AND ORG_UNIT.IS_ENABLE = 1 AND ORG_UNIT.IS_DELETED = 0
LEFT JOIN CTP_ENUM_ITEM ON CTP_ENUM_ITEM.SHOWVALUE = "temp_zc_info"."status_name" AND CTP_ENUM_ITEM.STATE = 1 AND CTP_ENUM_ITEM.OUTPUT_SWITCH = 1
WHERE FORMMAIN_0986.FIELD0001 is NOT NULL AND  CTP_ENUM_ITEM.REF_ENUMID = '-8285353862701692693' AND
(
FORMMAIN_0986.FIELD0006 != "temp_zc_info"."check_preiod_name" OR
"TO_DATE"("TO_CHAR"(FORMMAIN_0986.FIELD0007,'yyyy-MM-dd hh24:mi:ss'),'yyyy-MM-dd hh24:mi:ss') != "TO_DATE"("temp_zc_info"."next_check_date",'yyyy-MM-dd hh24:mi:ss')  OR
"TO_DATE"("TO_CHAR"(FORMMAIN_0986.FIELD0008,'yyyy-MM-dd hh24:mi:ss'),'yyyy-MM-dd hh24:mi:ss') != "TO_DATE"("temp_zc_info"."pre_check_date",'yyyy-MM-dd hh24:mi:ss')  OR
FORMMAIN_0986.FIELD0009 != ORG_MEMBER."ID" OR 
FORMMAIN_0986.FIELD0010 != "temp_zc_info"."location_name" OR 
FORMMAIN_0986.FIELD0011 != "temp_zc_info"."special_name" OR
FORMMAIN_0986.FIELD0014 != ORG_UNIT."ID" OR 
FORMMAIN_0986.FIELD0016 != "temp_zc_info"."facturer_name" OR 
FORMMAIN_0986.FIELD0004 != "temp_zc_info"."equip_name"
)